
class BaseQueryModel {
  bool? isPage;
  int? pageIndex;
  int? pageSize;
  String? siteId;
  String? serialNo;
  String? keyWord;

  BaseQueryModel({
    this.isPage,
    this.pageIndex,
    this.pageSize,
    this.siteId,
    this.keyWord,
    this.serialNo,
  });

  void init(String siteIdValue) {
    pageIndex = 1;
    pageSize = 10;
    isPage = true;
    siteId = siteIdValue;
  }

  BaseQueryModel.fromJson(Map<String, dynamic> json) {
    isPage = json['isPage'];
    pageIndex = json['pageIndex'];
    pageSize = json['pageSize'];
    siteId = json['siteId'];
    keyWord = json['keyWord'];
    serialNo = json['serialNo'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = Map<String, dynamic>();
    data['isPage'] = isPage;
    data['pageIndex'] = pageIndex;
    data['pageSize'] = pageSize;
    data['siteId'] = siteId;
    data['keyWord'] = keyWord;
    data['serialNo'] = serialNo;
    return data;
  }
}
